package com.sneakxy.mybase4j.util;

import java.beans.PropertyEditorSupport;

import org.apache.commons.lang3.StringEscapeUtils;

/**
 * @author 潜行的青衣
 * @see
 */
public class StringEscapeEditor extends PropertyEditorSupport {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		if (text == null) {
			setValue(null);
		} else {
			setValue(StringEscapeUtils.escapeHtml3(text)); 
		}
	}

}
